package com.itheima.day02_datatype;

public class Demo5_operator {
    public static void main(String[] args) {
        int a = 10;
        int b = 2;
        System.out.println("(a + b) = " + (a + b));
        System.out.println("(a - b) = " + (a - b));
        System.out.println("(a * b) = " + (a * b));
        System.out.println("(a / b) = " + (a / b));
        System.out.println("(5 / 2) = " + (5 / 2));
        System.out.println("(5.0 / 2) = " + (5.0 / 2));
        int j = 5;
        int i = 2;
        System.out.println("(1.0 * j / i) = " + (1.0 * j / i));
        System.out.println("(a % b) = " + (a % b));
        System.out.println("(3 % 2) = " + (3 % 2));

        int a2 = 5;
        System.out.println("(\"abc\" + a2) = " + ("abc" + a2));
        System.out.println("(a2 + 5) = " + (a2 + 5));
        System.out.println("(\"itheima\" + a2 + 'a') = " + ("itheima" + a2 + 'a'));
        System.out.println("(a2 + 'a' + \"itheima\") = " + (a2 + 'a' + "itheima"));
    }
}
